/* dialog组件库 */

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideDown {
  from {
    transform: translateY(-3em);
  } to {
    transform: translateY(0);
  }
}
@keyframes slideUp {
  from {
    transform: translateY(0);
  } to {
    transform: translateY(-3em);
  }
}
.dialog-wrapper {
  position: fixed;
  display: flex;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, .2);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  &.fadeIn {
    animation: fadeIn .3s ease;
  }
  &.fadeOut {
    animation: fadeOut .3s ease;
  }
  .dialog {
    position: relative;
    width: 600px;
    max-width: 100%;
    background-color: white;
    &.slideDown {
      animation: slideDown .3s ease;
    }
    &.slideUp {
      animation: slideUp .3s ease;
    }
    .dialog-title {
      padding: 20px 20px 10px;
      span {
        line-height: 24px;
        font-size: 18px;
        color: #303133;
      }
      .dialog_close_icon {
        position: absolute;
        top: 30px;
        right: 20px;
        padding: 0;
        border: none;
        outline: none;
        cursor: pointer;
        display: inline-block;
        width: 20px;
        height: 2px;
        background: #606266;
        transform: rotate(45deg);
        &::after {
          content: '';
          display: block;
          width: 20px;
          height: 2px;
          background: #606266;
          transform: rotate(-90deg);
        }
      }
    }
    .dialog-content {
      padding: 30px 20px;
      color: #606266;
      font-size: 14px;
      word-break: break-all;
      margin-bottom: 60px;
    }
    .dialog-footer {
      position: absolute;
      right: 0;
      bottom: 0;
      padding: 10px 20px 20px;
      text-align: right;
      box-sizing: border-box;
      &.center {
        width: 100%;
        text-align: center;
      }
      .dialog-footer-right {
        text-align: right;
        white-space: nowrap;
        .btn {
          display: inline-block;
          color: #606266;
          cursor: pointer;
          padding: 5px 15px;
          border-radius: 3px;
          border: 1px solid gainsboro;
          font-size: 14px;
          margin-left: 10px;
          &:hover {
            opacity: .8;
          }
          &.comfirm-btn {
            background-color: #409eff;
            color: white;
            border-color: #409eff;
          }
        }
      }
    }
  }
}